<%@page import="pojo.*,java.util.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>

<link rel="stylesheet" type="text/css"
	href="../Styles/contentMember.css" />

<div id="ContentPanel">
	<!-- Content -->
	<div id="MainPanel" align="left">

		<div class="ContentPart">
			<h1 class="ContentPartTitle" align="center">TRANG QUẢN LÝ BÌNH
				LUẬN</h1>
		</div>
		<div class="ContentPart">
			<h3 class="ContentPartHeader">Thông tin thành viên</h3>
			<div class="ContentPartContent">
				<div class="ins">Họ tên:</div>
				<div class="info">${sessionScope.taiKhoan.getHoten()}</div>
				<div class="ins">Ngày sinh:</div>
				<div class="info">${sessionScope.taiKhoan.getNgaysinh()}</div>
				<div class="ins">Địa chỉ:</div>
				<div class="info">${sessionScope.taiKhoan.getDiachi()}</div>
				<div class="ins">Email:</div>
				<div class="info">${sessionScope.taiKhoan.getEmail()}</div>
			</div>
		</div>
		<div class="ContentPart">
			<h3 class="ContentPartHeader">Thao tác</h3>
			<div class="ContentPartContent">
				<div id="leftAction" align="left">
					<a href="TrangTaiKhoanThanhVien.do?action=LietKeToanBo">
						<div class="actionWideButtonLeft borderThick" align="center">
							<img class="buttonImage"
								src="../Images/Icon/icon_lietKeLarge.png" alt="Thêm" />
							<div class="buttonCaption">Liệt kê Đơn hàng</div>
						</div>
					</a> <a href="TrangTaiKhoanThanhVien.do?action=ChinhSuaThongTin">
						<div class="actionWideButtonLeft borderThick" align="center">
							<img class="buttonImage" src="../Images/Icon/icon_editLarge.png"
								alt="Chỉnh sửa thông tin" />
							<div class="buttonCaption">Chỉnh sửa thông tin</div>
						</div>
					</a> <a href="TrangTaiKhoanThanhVien.do?action=DoiMatKhau">
						<div class="actionWideButtonLeft borderThick" align="center">
							<img class="buttonImage"
								src="../Images/Icon/icon_passwordLarge.png" alt="Đổi mật khẩu" />
							<div class="buttonCaption">Đổi mật khẩu</div>
						</div>
					</a>
				</div>
			</div>
		</div>
		<c:if
			test="${null != requestScope.listHoaDon && requestScope.listHoaDon.size() > 0}">
			<div class="ContentPart">
				<h3 class="ContentPartHeader">Danh sách Đơn đặt hàng</h3>
				<table class="tableQuanLy" border="0" cellpadding="0"
					cellspacing="0">
					<!-- Table -->
					<thead align="center">
						<tr>
							<th>STT</th>
							<th>Mã đơn</th>
							<th>Số sản phẩm</th>
							<th>Ngày đặt</th>
							<th>Tổng tiền (VNĐ)</th>
							<th>T.Thái</th>
						</tr>
					</thead>
					<tbody>

						<c:forEach var="i" begin="0"
							end="${requestScope.listHoaDon.size()-1}">
							<c:choose>
								<c:when test="${(i + 1) % 2 == 1 }">
									<tr class="rowLe">
								</c:when>
								<c:otherwise>
									<tr class="rowChan">
								</c:otherwise>
							</c:choose>
							<td width="5%">${i + 1}</td>
							<td width="10%"><a href="#">${requestScope.listHoaDon[i].getMahoadon()}</a></td>
							<td><a href="#">${requestScope.listHoaDon[i].getChitiethoadons().size()}
									sản phẩm</a></td>
							<td width="15%" align="center">${requestScope.listHoaDon[i].getNgayxuat()}</td>
							<td width="15%" align="right"><font color="#FF0000">
									<fmt:formatNumber type="number"
										value="${requestScope.listHoaDon[i].getTongtien()*1000}"
										groupingUsed="true" />
							</font></td>
							<td width="10%" align="center"><c:choose>
									<c:when
										test="${requestScope.listHoaDon[i].getDaduyet() == true}">
									Duyệt
								</c:when>
									<c:otherwise>
									Chưa
								</c:otherwise>
								</c:choose></td>
							</tr>
						</c:forEach>
						<!-- 
          <tr class="rowChan">
            <td width="5%">1</td>
            <td width="10%"><a href="#">123456</a></td>
            <td><a href="#">2 sản phẩm</a></td>
            <td width="15%" align="center">2012/10/30</td>
            <td width="15%" align="right"><font color="#FF0000">1.234.567</font></td>
            <td width="10%" align="center">Duyệt</td>
          </tr>
           -->
					</tbody>
				</table>
			</div>

		</c:if>
	</div>
	<!-- Content -->
</div>